package day09;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @author げっしょく
 * @date 2021/7/12
 */
public class menpaixitong {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<MenPai> list = new ArrayList<>();
        int a = 0;
        while(true){
            System.out.println("------欢迎来到合欢宗管理系统------");
            System.out.println("1 查看门派人员");
            System.out.println("2 逐出门派 ");
            System.out.println("3 修改人员信息");
            System.out.println("4 宗门任务");
            System.out.println("5 退出系统");
            System.out.println("请选择");
            a = sc.nextInt();
            switch(a){
                case 1:
                    eyelist(list);
                    break;
                case 2:
                    delete(list);
                    break;
                case 3:

                    break;
                case 4:

                    break;
                case 5:

                    return ;
                default:
                    System.out.println("选择错误，暂时没有其他项目可供选择");
                    System.out.println("请重新输入：");
            }

        }
    }

    private static void delete(ArrayList<MenPai> list) {
        System.out.println("");
        for (int i = 0; i < list.size(); i++) {
            MenPai st = list.get(i);
        }

    }

    private static void eyelist(ArrayList<MenPai> list) {
        if(list.size() != 0) {
            System.out.println("职位\t姓名\t修炼时期\t入宗时间");
            for (int i = 0; i < list.size(); i++) {
                MenPai ren = list.get(i);
                System.out.println(ren.getZhiwei()+"\t"+ ren.getName()+"\t"+ren.getShiqi()+"\t"+ren.getTime());
            }
        }
    }
}
